Skip to content

Say in the API that memory and Learning are kept per organization - #1697

Closed
davidmckayv wants to merge 3 commits into
mainfrom
orgs/learning-memory-api
Closed

davidmckayv wants to merge 3 commits into
mainfrom
orgs/learning-memory-api

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What

The Learning and memory areas of the API spec now say that both are kept per organization.

  • A person's memory belongs to one organization. What their Bots remember in one organization is never listed or recalled in another they belong to, and a memory named from another organization is answered as not found.
  • Learning spaces belong to one organization, and each person has their own space in each organization they belong to. Sharing a skill with every Bot means every Bot in that organization, never a Bot in another.
  • An administrator of Learning is an administrator of the organization in the address.

Why

An organization is a permissions boundary: a person can be in two, and sees each on its own.

Scope

Descriptions only. No operation, parameter or schema changes shape, so the breaking-change check has nothing to flag. The bundled spec and the generated clients are regenerated (bun run api:generate); the only differences are the description text they carry.

Base automatically changed from orgs/organizations-api to main November 15, 2026 22:18
A person's memory and Learning spaces belong to one organization: nothing remembered or learned in one is listed, recalled or shared in another the person belongs to. The Learning and memory areas of the spec now say so, and that sharing a skill with every Bot means every Bot in the organization. Descriptions only; no operation or schema changes shape.
@davidmckayv
davidmckayv force-pushed the orgs/learning-memory-api branch from 565d0c0 to 7362e46 Compare November 15, 2026 22:20
…ver show its id

Where OpenBot keeps a Learning container for each organization alone, the
container's id is a digest that says nothing to a person. On the admin's
Automatic learning page inside such an organization the container read
"OpenBot: org-<digest> (org-<digest>)", the default's field held the digest,
and the picker and each Bot's choice said "Deployment default".

The API now says which container is the organization's own
(organizationSpaceId on the Learning settings, null or absent where OpenBot
keeps none), and the page chooses the words from that and the organization's
name:

- The container shown reads "Default container for <organization>", or
  'The "<name>" container for <organization>' for one an admin named.
- The picker says "This organization's default" and a Bot's choice
  "Use this organization's default".
- A container field holds only the name an admin gave a container. An empty
  field is the organization's default. The page sends the id the server keeps.
- A container that is not there yet, the button that creates it and the note
  about automatic assignment name it as the organization's default.

Nothing that names a container is drawn until the server has said which one
is the organization's own, so the id is never on the page.

An install's first organization has no container kept for it alone, and reads
as it always did: "Deployment default", the container's name and id, and the
id in its field.
The Bot chat reconnects by itself when a run starts on its thread from
another tab, another device or a routine. It learns of the run from a live
update that names the thread, and takes it only when that name is its own
thread id.

A thread has two ids: the one the app keeps and sends, and the one live
updates carry. In the organization default they are the same. In any other
organization they differ, so an update about the open thread named an id
the chat had never seen, and the answer appeared only after a reload.

The server now says the live id when it mints a thread and when it is asked
whether a thread is still there: liveThreadId, an optional addition to both
conversation-threads answers. The Bot chat is given its live updates under
the id it has, through a thread store registered for its Bot before the
chat starts listening. Where the two ids are the same nothing is registered
and the chat listens as it always has.
davidmckayv added a commit that referenced this pull request Nov 16, 2026
…ory and Learning, one's own organization and invitations, teams, and Desktop connected to a remote OpenBot (#1705)

Organizations, phase 2, fused into one branch: each organization governs itself, memory and Learning are kept per organization, an organization of one's own at first sign-in with invitations, teams inside an organization, and OpenBot Desktop connected to an OpenBot that runs somewhere else.

This branch merges, at their current heads:

- #1701 Say in the spec and Admin that each organization governs itself
- #1697 Say in the API that memory and Learning are kept per organization
- #1700 Invitations, organization settings and an organization of one's own in the app
- #1699 Teams inside an organization: the API, the screens, and granting to a team
- #1698 Add an API keys page to Settings, and say what OAuth needs in the spec
- #1702 Connect OpenBot Desktop to an OpenBot that runs somewhere else
- main, with #1704

On top of the merges:

- The spec bundled once and the clients generated again from it, keeping every piece's additions in the shared spec files.
- The teams tests' organization and member fixtures carry the fields an organization and a member answer with (`personal`, `removable`, `assignableRoles`).
- The rust-toolchain action's pin is commented with the tag it is (`v1`), as the static analysis of the workflows asks.

Checked locally: format, lint, typecheck, API lint, the teams, Learning and audit tests.

Draft: the pieces' own PRs stay open; this lands them together after one end-to-end test.
@davidmckayv

Copy link
Copy Markdown
Contributor Author

Carried in #1705.

@davidmckayv
davidmckayv deleted the orgs/learning-memory-api branch November 16, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant